import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'
import home_one from "@/components/home_one"
import home_two from "@/components/home_two"
import home_three from "@/components/home_three"
import home_for from "@/components/home_for"
import detail  from "@/components/detail"
import Market from "@/components/Market"
import Market_index from "@/components/Market_index"
import Market_result from "@/components/Market_result"
import Market_search from "@/components/Market_search"
import content from "@/components/content"
import pinjia from "@/components/pinjia"
import Cart from "@/components/Cart"
import Cart_in from "@/components/Cart_in"
import xinxi from "@/components/xinxi"
import Mine from "@/components/Mine"
import Mine_in from "@/components/Mine_in"
import reg from "@/components/reg"

import list1 from "@/components/list1"
import list2 from "@/components/list2"
import list3 from "@/components/list3"
import list4 from "@/components/list4"

Vue.use(Router);

export default new Router(
  {
    routes: [{
      path: '/Home',
      name: 'Home',
      component: Home,
    },
      {
        path: "/home_one",
        name: "home_one",
        component: home_one,
      },
      {
        path: "/home_two",
        name: "home_two",
        component: home_two,
        children: [{
        path: "list1",
        name: "list1",
        component: list1,
      },{
        path: "list2",
        name: "list2",
        component: list2,
      },{
        path: "list3",
        name: "list3",
        component: list3,
      },{
        path: "list4",
        name: "list4",
        component: list4,
      }, {
        path: '', redirect: "list1"
      } ]
      },
      {
        path: "/home_three",
        name: "home_three",
        component: home_three,
      },
      {
        path: "/home_for",
        name: "home_for",
        component: home_for,
      },
      {
        path: "/detail",
        name: "detail",
        component:detail,
      },
     {
        path: "/content",
        name: "content",
        component:content,
      },
       {
        path: "/pinjia",
        name: "pinjia",
        component:pinjia,
      },
       {
        path: "/xinxi",
        name: "xinxi",
        component:xinxi,
      },
      {
      path: '/Market',
      name: 'market',
      component: Market,
      children: [{
        path: "Market_index",
        name: "market_index",
        component: Market_index,
      },{
        path: "Market_result",
        name: "market_result",
        component: Market_result,
      },{
        path: "Market_search",
        name: "market_search",
        component: Market_search,
      }, {
        path: '', redirect: "Market_index"
      } ]
    },
      {
      path: '/Cart',
      name: 'Cart',
      component: Cart,
      children: [{
        path: "Cart_in",
        name: "Cart_in",
        component: Cart_in,
      }]
    }, {
      path: '/Mine',
      name: 'mine',
      component: Mine
    },
    {
      path: '/Mine_in',
      name: 'mine_in',
      component: Mine_in
    },
    {
    	path: '/reg',
      name: 'reg',
      component: reg
    },
    
    {
      path: '*', redirect: "/Home"
    }]
  })
